<p id="notice">
	<%= notice %>
</p>

<p>
	<b>Customer:</b>
	<%= @customer.company %>
</p>

<p>
	<b>User:</b>
	<%= @invoice.user_id %>
</p>

<table>
	<thead>
		<tr>
			<th>Product</th>
			<th>Size</th>
			<th>Size Number</th>
			<th>Quantity</th>
		</tr>
	</thead>
	<tbody>
		<%  @invoice.invoice_items.each do |item| %>
		<tr>
			<td><%= Product.find(item.product_id).name %></td>
			<td><%= item.size %></td>
			<td><%= item.size_number %></td>
			<td><%= item.quantity %></td>
		</tr>
		<% end %>
	</tbody>
</table>

<%= link_to 'Edit', edit_invoice_path(@invoice) %> |
<%= link_to 'Back', invoices_path %>
